﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Core.CoreImpl;
using EzDesk.Core.Model;

namespace EzDesk.Core.ServiceWebRef
{
    public class CoreAppWebRef : ICoreAppService
    {
        private ICoreAppService _coreAppService = new CoreAppService();

        public UserProfile GetUserProfileById(Guid userId)
        {
            return _coreAppService.GetUserProfileById(userId);
        }

        public IList<SimpleUser> GetSimpleUserInfos(string userIdStrs)
        {
            return _coreAppService.GetSimpleUserInfos(userIdStrs);
        }

        public IList<Dept> GetAllDepts()
        {
            return _coreAppService.GetAllDepts();
        }

        public IList<SimpleUser> GetAllUsersByMemberString(string memberString)
        {
            return _coreAppService.GetAllUsersByMemberString(memberString);
        }

        public IDictionary<Guid, string> GetChildrenByMemberString(string memberString)
        {
            return _coreAppService.GetChildrenByMemberString(memberString);
        }


        public IList<Group> GetAllSystemGroups()
        {
            return _coreAppService.GetAllSystemGroups();
        }


        public void UpdateFeedData(Guid feedId, string newFeedData)
        {
            _coreAppService.UpdateFeedData(feedId, newFeedData);
        }

        public void SetFeedIsAvailable(Guid feedId, string memberString, bool isAvailable)
        {
            _coreAppService.SetFeedIsAvailable(feedId, memberString, isAvailable);
        }


        public SimpleUser GetSimpleUserById(Guid userId)
        {
            return _coreAppService.GetSimpleUserById(userId);
        }



        public Group GetGroupById(Guid groupId)
        {
            return _coreAppService.GetGroupById(groupId);
        }

        public IList<Group> GetGroups(string groupIdStrs)
        {
            return _coreAppService.GetGroups(groupIdStrs);
        }

        public void SetFeedsIsAvailable(string feedIdStrs, string memberString, bool isAvailable)
        {
            _coreAppService.SetFeedsIsAvailable(feedIdStrs, memberString, isAvailable);
        }


        public Group GetGroupMemberstring(string memberstring)
        {
            return _coreAppService.GetGroupMemberstring(memberstring);
        }

        public void UpdateFeedsData(string updateFeeds, string updateFeedData)
        {
            _coreAppService.UpdateFeedsData(updateFeeds, updateFeedData);
        }


        public Guid SendFeed(string feedTypeStr, Guid templateId, Guid? senderId, string feedData, string memberString, bool sendToSelf)
        {
            return _coreAppService.SendFeed(feedTypeStr, templateId, senderId, feedData, memberString, sendToSelf);
        }

        public void UpdatePersonalFeedData(Guid feedId, string memberstring, string feedDataEx)
        {
            _coreAppService.UpdatePersonalFeedData(feedId, memberstring, feedDataEx);
        }

        public Guid SendFeed(string feedTypeStr, string templateName, Guid? senderId, string feedData, string memberString, DateTime expireOn, bool sendToSelf)
        {
            return _coreAppService.SendFeed(feedTypeStr, templateName, senderId, feedData, memberString, expireOn, sendToSelf);
        }

    }
}
